from flask import Blueprint, render_template, session

index5 = Blueprint("index5",__name__)

# 蓝图上下文处理器
@index5.context_processor
def my_func():
    # 上下文处理器里边的返回值必须是字典类型
    return {"title":"论Python语言的学习难度","count": 2001}


@index5.context_processor
def my_func1():
    my_dict = {
        "title1": "论Python语言的学习难度1111",
        "count1": 2001111
    }
    return dict(my=my_dict)

@index5.context_processor
def my_func2():
    def add(a,b):
        return a+b
    return dict(my_add=add)

@index5.context_processor
def my_func3():
    # 上下文处理器里边的返回值必须是字典类型
    def add(a,b):
        return a+b
    return {"my_add2":add}



@index5.route("/index-new3")
def my_index():

    return render_template("index5.html")